#pragma once // DEBT_H
#include "money.h"

class CDebt : public CMoney
{
public:
    CDebt();
    CDebt(std::string name = "", long double principal = 0.0, double rate = 0.0 );
    ~CDebt();
public:
    virtual void refresh();
    virtual void print();
    double makePayment(double payment);
    double totalAmortized();
    double totalInterest();
protected:
    double m_payOffDate;
    double m_minPayment;
    std::vector<double> m_amortized;
    std::vector<double> m_interest;
    unsigned short m_numCompounds;
    unsigned short m_numPeriods;
    double compound(unsigned short numCompounds, unsigned short numPeriods);
};

